<?php
namespace App\Repository;

use App\Model\UserLog;

class UserLogRepository extends \HyperfStore\Repository
{
    // 放入模型
    public function build()
    {
        return new UserLog;
    }

    // 创建
    public function create(UserRepository $user, $data)
    {
        $this->model->user()->associate($user->model());
        
        return $this->save($data);
    }
}